import http from '../utils/request'
const { request } = http
import {getLang} from '../utils/utils.js'
const lang = uni.getLocale()?uni.getLocale():'zh-Hans'
// 登录
export const login = data => request.post('/user/login', {lang:lang,...data})
// 注册
export const register = data => request.post('/user/register', {lang:lang,...data})
// 退出登录
export const logout = data => request.post('/user/logout', {lang:lang,...data})
// 注册验证码
export const getCaptcha = data => request.get('/common/captcha2', {lang:lang,...data})
// 修改登录密码
export const editLoginPwd = data => request.post('/user/updatePassword', {lang:lang,...data})
// 修改交易密码
export const editPayPwd = data => request.post('/user/updateSafePassword', {lang:lang,...data})
// 系统消息
export const getMsg = data => request.get('/index/msg', {lang:lang,...data})
// 轮播图
export const getBanner = data => request.get('/index/banner', {lang:lang,...data})
// 公告
export const getNotice = data => request.get('/index/notice', {lang:lang,...data})
// 产品推荐列表
export const getRecomList = data => request.get('/products/getRecomList', {lang:lang,...data})
// 分类列表
export const getClassifyList = data => request.get('/products/getClassifyList', {lang:lang,...data})
// 产品列表
export const getProductsList = data => request.get('/products/getList', {lang:lang,...data})
// 实时k线
export const getKline = data => request.get('/products/getKline', {lang:lang,...data})
// 产品详情
export const getProductsInfo = data => request.get('/products/getInfo', {lang:lang,...data})
// 实名认证
export const userRealAttest = data => request.post('/user/userRealAttest', {lang:lang,...data})
// 创建订单
export const createOrder = data => request.post('/order/create', {lang:lang,...data})
// 订单记录
export const getOrderList = data => request.get('/order/getList', {lang:lang,...data})
// 入金记录
export const getRjList = data => request.get('/recharge/getOrderList', {lang:lang,...data})
// 绑定银行卡
export const bindbank = data => request.post('/user/bindbank', {lang:lang,...data})
// 绑定USDT 地址
export const bindUSDTAddress = data => request.post('/user/bindusdtaddress', {lang:lang,...data})
// 提现
export const createWithdrawal = data => request.post('/Withdrawal/create', {lang:lang,...data})
// 提现记录
export const getWithdrawalList = data => request.get('/Withdrawal/getOrderList', {lang:lang,...data})
// 资金记录
export const getUserMoneyLog = data => request.get('/user/getMoneyLog', {lang:lang,...data})
// 个人中心
export const getUserInfo = data => request.post('/user/index', {lang:lang,...data})
// 关于我们
export const getAbout_us = data => request.get('/index/about_us', {lang:lang,...data})
// 我的收款方式
export const getMyAddress = data => request.get('/user/myAddress', {lang:lang,...data})
// 获取产品代码
export const getProductCode = data => request.get('/products/getCode', {lang:lang,...data})
// 隐私政策
export const getPolicy = data => request.get('/index/policy', {lang:lang,...data})

// 入金
export const rechargeCreate = data => request.post('/recharge/create', {lang:lang,...data})

